package com.hyxy.demo;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        //创建容器对象（初始化容器对象）
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        //调用容器的API方法，从容器中获得对象
        Driver driver = (Driver)applicationContext.getBean("driver");

        driver.driving();
    }
}
